//
//  EpointFileOpenViewController.m
//  EpointFrame5
//
//  Created by 李亚春 on 14-4-4.
//  Copyright (c) 2014年 Epoint. All rights reserved.
//

#import "EpointFileOpenViewController.h"
#import "EpointIOUtil.h"

@interface EpointFileOpenViewController ()
{
    UIWebView *wv;
}
@end

@implementation EpointFileOpenViewController

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
//    [self.navigationController setNavigationBarHidden:YES animated:YES];
    
    wv = [[UIWebView alloc]initWithFrame:self.getFullContentFrame];
    wv.scalesPageToFit = YES;
    [self.view addSubview:wv];
    NSString *filePath = [self.passParam objectForKey:@"FilePath"];
    NSArray *filePathParts =[filePath componentsSeparatedByString:@"/"];
    
    [self setTitle:[filePathParts objectAtIndex:filePathParts.count-1]];
    
    [EpointIOUtil openTxtFile:filePath withWebView:wv];
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
